package com.zpself.module.算法练习.栈与队列;

import java.util.ArrayDeque;
import java.util.Deque;

/**
 * @author By ZengPeng
 * @Description
 * @date in  2021/2/21 14:36
 * @Modified By
 */
public class DequeApi {
    public static void main(String[] args) {
        Deque<String> deque = new ArrayDeque<>();
        deque.push("a");
        deque.push("b");
        deque.push("c");
        deque.push("d");

        System.out.println(deque.peek());
        System.out.println(deque);
        System.out.println(deque.peekLast());
        System.out.println(deque);
        System.out.println(deque.removeLast());
        System.out.println(deque);
    }
}
